-
Notifications
You must be signed in to change notification settings - Fork 1.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Bug]Fix bugs in imequalize, adjust_brightness and adjust_contrast #863
[Bug]Fix bugs in imequalize, adjust_brightness and adjust_contrast #863
Conversation
Codecov Report
@@ Coverage Diff @@
## master #863 +/- ##
=======================================
Coverage 66.41% 66.42%
=======================================
Files 145 145
Lines 8770 8772 +2
Branches 1599 1599
=======================================
+ Hits 5825 5827 +2
Misses 2629 2629
Partials 316 316
Flags with carried forward coverage won't be shown. Click here to find out more.
Continue to review full report at Codecov.
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Many thanks for your nice work. It looks good to me.
@@ -166,7 +166,7 @@ def _scale_channel(im, c): | |||
s2 = _scale_channel(img, 1) | |||
s3 = _scale_channel(img, 2) | |||
equalized_img = np.stack([s1, s2, s3], axis=-1) | |||
return equalized_img | |||
return equalized_img.astype((img.dtype)) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
.astype(img.dtype)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi,
In this pull request, bugs in
imequalize
,adjust_brightness
andadjust_contrast
are fixed and unittests are updated.For
imequalize
,astpye
is missing, which will cause the output to be in wrong type(int64). #861For
adjust_brightness
andadjust_contrast
, factor could be larger than 1. Clipping is needed since we use float32 to calculate.Pls kindly take a look. Thank you.